<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>优惠券管理</title>
	<meta name="decorator" content="default"/>
<link href="${ctxStatic}/jquery-ui-1.12.1/jquery-ui.min.css" rel="stylesheet" />
<script src="${ctxStatic}/jquery-ui-1.12.1/jquery-ui.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/js/messages_zh.js" type="text/javascript"></script>
<script src="${ctxStatic}/js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	
	
/*表单验证*/
$('#inputForm').validate({
    rules:{
    	nowpayget:"required",
    	downpayget: "required",
    	ownpayget: "required"
    },	    
   messages:{
	   nowpayget: "请输入实收金额",
	   downpayget:"请输入实收金额",
	   ownpayget:"请输入实收金额"
   }
   
});		

});
</script>

</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/finance/tFinance/list">财务管理列表</a></li>
		<li class="active"><a href="javascript:">财务详情</a></li>
	</ul>
	<form:form id="inputForm" modelAttribute="tFinance"
		action="${ctx}/finance/tFinance/save" method="post" class="form-horizontal">
		<input type="hidden" name="ordertype" value="${tFinance.ordertype}">
		<div class="control-group">
			<label class="control-label">订单号：</label>
			<div class="controls">
				<form:input path="orderid" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">线路名称：</label>
			<div class="controls">
				<form:input path="ordername" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">司机：</label>
			<div class="controls">
				<form:input path="drvname" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">用车单位：</label>
			<div class="controls">
				<form:input path="clientname" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">车牌号：</label>
			<div class="controls">
				<form:input path="licno" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单金额：</label>
			<div class="controls">
				<form:input path="dueamount" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  /> 
			</div>
		</div>
		 <div class="control-group">
			<label class="control-label">扣款金额：</label>
			<div class="controls">
				<form:input path="deductions" htmlEscape="false" maxlength="40"
						type="number"  class="span4 "  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">扣款事由：</label>
			<div class="controls">
				<form:input path="dedreason" htmlEscape="false" maxlength="200" 
						  class="span4 "  />
			</div>
		</div> 
		<div class="control-group">
			<label class="control-label">实收金额：</label>
			<div class="controls">
				<%-- <form:input path="dueamount" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  /> --%>
				<input  type="text" class="span4 required" readonly="readonly" value="${tFinance.dueamount - tFinance.deductions  }" htmlEscape="false">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">现收金额：</label>
			<div class="controls">
			<c:if test="${tFinance.ordertype eq '7' }">
				<form:input path="nowpay" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</c:if>
			<c:if test="${tFinance.ordertype ne '7' }">
				<form:input path="dueamount" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</c:if>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">实收金额：</label>
			<div class="controls">
				<form:input path="nowpayget" htmlEscape="false" maxlength="40"
						type="number" min="0" class="span4 required" name="nowpayget" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">定金金额：</label>
			<div class="controls">
				<form:input path="downpay" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">实收金额：</label>
			<div class="controls">
				<form:input path="downpayget" htmlEscape="false" maxlength="40"
						type="number"  min="0" class="span4 required" name="downpayget" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">挂账金额：</label>
			<div class="controls">
				<form:input path="ownpay" htmlEscape="false" maxlength="40"
						readonly="true"  class="span4 required"  />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">实收金额：</label>
			<div class="controls">
				<form:input path="ownpayget" htmlEscape="false" maxlength="40"
						type="number" min="0"  class="span4 required" name="ownpayget" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注：</label>
			<div class="controls">
				<form:input path="financeremark" htmlEscape="false" maxlength="40"
						  class="span4 "  />
			</div>
		</div>
		<div class="form-actions">
				<input id="btnSubmit" class="btn btn-primary" type="submit"
					value="保 存" />&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回"
				onclick="history.go(-1)" />
		</div>
	</form:form>	
</body>
</html>